<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box{
            font-size: 16px;
            border: solid 10px #f2f2f2;
            width: 500px;
            margin-bottom: 2rem;
        }
        .box >span{
            font-size: 36px;
        }
        .normal{
            line-height: normal;
        }
        .px20{
            line-height: 20px;
        }
        .p150{
            line-height: 150%;
        }
        .l15{
            line-height: 1.5;
        }
    </style>
</head>
<body>
    <h1>line-height</h1>
    <h2>normal</h2>
    <div class="box normal">
        <span>normal: 允许内容顶开或溢出指定的容器边界</span>
    </div>
    <div class="box px20">
         <span>line-height: 20px: 允许内容顶开或溢出指定的容器边界</span>
    </div>
    <div class="box p150">
         <span>line-height: 150%: 最终结果值是基于父元素的font-size值来计算的</span>
    </div>
    <div class="box l15">
         <span>line-height: 1.5: 最终结果值是基于自身元素的font-size值来计算</span>
    </div>
</body>
</html>